package Algorithms.KMP_05;

/*
 * @Author 罗
 * @date 2020/3/30 - 1:00 上午
 *
 */

public class test {

    public static void main(String[] args) {
        String origin = "BBC ABCDAB ABCDABCDABDE";
        String key = "ABCDABD";
        //myKMP(origin,key);

        int index = KMP.kmp4(origin, key);
        System.out.println("index = " + index);
    }

    public static void myKMP3(String origin, String key) {
        int index = KMP.kmp3(origin, key);
        System.out.println("index = " + index);
    }

    public static void myKMP2(String origin, String key) {
        int index = KMP.kmp2(origin, key);
        System.out.println("index = " + index);
    }

    public static void myKMP(String origin, String key) {
        int index = KMP.kmp(origin, key);
        System.out.println("index = " + index);
    }
}
